<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>华为商城 - 华为官网商城</title>
    <link rel="stylesheet" href="./css/style.css">
    <!-- 在head中添加 客服-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="top-bar">
        <div class="container">
            <div class="top-links">     
                <a href="#">华为官网</a>
                <a href="#">荣耀官网</a>
                <a href="#">华为云</a>
                <a href="#">软件应用</a>
                <a href="#">消费者业务</a>
            </div>
            <div class="user-links">
                <a href="#" id="login-link">登录</a>
                <a href="#" id="register-link">注册</a>
                <a href="#">我的订单</a>
                <a href="#">会员中心</a>
                <a href="#">客户服务</a>
                <a href="#">网站导航</a>
            </div>
        </div>
    </div>

    <!-- 主导航栏 -->
    <header class="main-header">
        <div class="container">
            <div class="logo">
                <img src="./images/logo_app.png" alt="华为商城">
            </div>
            <nav class="main-nav"> 
                <ul>
                    <li><a href="#" class="active">首页</a></li>
                    <li><a href="#">手机</a></li>
                    <li><a href="#">笔记本</a></li>
                    <li><a href="#">平板</a></li>
                    <li><a href="#">穿戴</a></li>
                    <li><a href="#">智能家居</a></li>
                    <li><a href="#">配件</a></li>
                    <li><a href="#">更多产品</a></li>
                </ul>
            </nav>
            <div class="search-cart">
                <div class="search-box">
                    <input type="text" placeholder="搜索商品">
                    <button><i class="fa fa-search"></i></button>
                </div>
                <div class="cart">
                    <a href="#">
                        <i class="fa fa-shopping-cart"></i>
                        <span class="cart-count">0</span>
                    </a>
                </div>
            </div>
        </div>
    </header>


    <!-- 购物车页面 (初始隐藏) -->
<div id="cart-page" class="cart-page">
    <div class="cart-overlay"></div> <!-- 新增遮罩层 -->
    <div class="cart-container">  <!-- 新增容器用于滑动 -->
    <div class="cart-header">
        <h2>我的购物车</h2>
        <button class="close-cart">&times;</button>
        </div>
        <div class="cart-content"> <!-- 新增内容容器 -->
        <div class="cart-empty" id="cart-empty">
            <p>您的购物车还是空的</p>
            <a href="#" class="btn" id="continue-shopping">继续购物</a>
        </div>
        <div class="cart-items" id="cart-items">
            <table>
                <thead>          
                    <tr>
                        <th>商品信息</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>小计</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="cart-items-list">
                    <!-- 商品将在这里动态添加 -->
                </tbody>
            </table>
        </div>
        </div>
        <!-- 修改购物车底部结算栏结构 -->
            <div class="cart-summary">
                <div class="total-price">
                    总计: <span id="cart-total">¥0</span>
                </div>
                <button class="btn checkout-btn" id="checkout-btn">去结算</button>
            </div>
        </div>
    </div>
</div>

  
    <!-- 轮播图 -->
    <section class="banner">
        <div class="slider">
            <div class="slide active">
                <img src="./images/80.jpg" alt="华为P80系列">
                <div class="slide-content">
                    <h2>华为P80系列</h2>
                    <p>超聚光XMAGE影像</p>
                    <a href="#" class="btn">立即购买</a>
                </div>
            </div>
            <div class="slide">
                <img src="./images/x6.jpg" alt="华为Mate X6">
                <div class="slide-content">
                    <h2>华为Mate X6</h2>
                    <p>超轻薄折叠屏</p>
                    <a href="#" class="btn">立即购买</a>
                </div>
            </div>
            <div class="slide">
                <img src="./images/watch5.jpg" alt="华为WATCH 5">
                <div class="slide-content">
                    <h2>华为WATCH 5</h2>
                    <p>星球科技美学</p>
                    <a href="#" class="btn">立即购买</a>
                </div>
            </div>
            <div class="slider-controls">
                <button class="prev"><i class="fa fa-angle-left"></i></button>
                <button class="next"><i class="fa fa-angle-right"></i></button>
            </div>
            <div class="slider-dots">
                <span class="dot active"></span>
                <span class="dot"></span>
                <span class="dot"></span>
            </div>
        </div>
    </section>

    <!-- 快速导航 -->
    <section class="quick-nav">
        <div class="container">
            <a href="#" class="quick-link">
                <img src="./images/手机.png" alt="手机">
                <span>手机</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/笔记本.png" alt="笔记本">
                <span>笔记本</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/平板.png" alt="平板">
                <span>平板</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/穿戴.png" alt="穿戴">
                <span>穿戴</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/智能家居.png" alt="智能家居">
                <span>智能家居</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/配件.png" alt="配件">
                <span>配件</span>
            </a>
            <a href="#" class="quick-link">
                <img src="./images/更多.png" alt="更多产品">
                <span>更多产品</span>
            </a>
        </div>
    </section>


    <!-- 在适当位置添加新人福利专区 -->
<section class="new-user-section">
    <div class="container">
        <div class="section-header">
            <h3>新人有礼福利专区</h3>
            <a href="#" class="more-link">更多福利 ></a>
        </div>
        <div class="new-user-products">
            <div class="new-user-card">    
                <div class="product-image">
                    <img src="./images/新人礼包.png" alt="新人礼包">
                </div>
                <div class="product-info">
                    <h4>新人专享礼包</h4>
                    <p class="price">¥1 <span class="original-price"></span></p>
                    <button class="btn">立即领取</button>
                </div>
            </div>
            <div class="new-user-card">
                <div class="product-image">
                    <img src="./images/新人优惠券.png" alt="新人优惠券">
                </div>
                <div class="product-info">
                    <h4>新人专享券</h4>
                    <p class="price">¥20 <span class="original-price"></span></p>
                    <button class="btn">立即领取</button>
                </div>
            </div>
            <div class="new-user-card">
                <div class="product-image">
                    <img src="./images/新人特价.png" alt="新人特价">
                </div>
                <div class="product-info">
                    <h4>新人特价商品</h4>
                    <p class="price">¥199 <span class="original-price">¥599</span></p>
                    <button class="btn">立即抢购</button>
                </div>
            </div>
        </div>
    </div>
</section>


<!-- 商品分类 1-->
     <!-- 手机产品模块1 -->
<section class="product-section tablet-section">
  <div class="container">
    <h2 class="section-title">手机 </h2>
    
    <!-- 旗舰产品展示 -->
    <div class="flagship-product">
      <div class="flagship-image">
        <img src="./images/mateXT 非凡大师.png" 
             alt="HUAWEI Mate XT" class="product-img">
        <div class="flagship-badge">旗舰新品</div>
      </div>
      <div class="flagship-info">                             
        <h3 class="product-title">HUAWEI Mate XT 非凡大师</h3>
        <p class="product-desc">10.2英寸超形态三折叠大师-机多能科技新物种</p>
        <div class="price-section">
          <span class="current-price">¥21999</span>
        </div>
        <div class="tag-group">
          <span class="product-tag">限时优惠</span>
          <span class="product-tag">12期免息</span>
        </div>
        <button class="buy-btn">立即购买</button>
      </div>
    </div>

    <!-- 产品矩阵 -->
    <div class="product-matrix">
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/nova13.png" 
               alt="nova 13" class="matrix-img">
          <h4 class="matrix-title">Nova 13"</h4>
          <p class="matrix-desc">前置600万用户/私人像 AI伴侣</p>
          <div class="matrix-price">¥2499</div>
          
        </div>
      </div>       
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/mateX5.png" 
               alt="Mate X5" class="matrix-img">
          <h4 class="matrix-title">Mate X5</h4>
          <p class="matrix-desc">超轻薄型</p>
          <div class="matrix-price">¥10499</div>
          
        </div>   
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/nova12活力版.png" 
               alt="nova 12 活力版" class="matrix-img">
          <h4 class="matrix-title">Nova 12 活力版"</h4>
          <p class="matrix-desc">6.8mm超薄滑直车屏</p>
          <div class="matrix-price">¥2049</div>
          
        </div>
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/pura70 pro.png" 
               alt="Pura 70 Pro" class="matrix-img">
          <h4 class="matrix-title">Pura 70 Pro</h4>
          <p class="matrix-desc">超豪华配置</p>
          <div class="matrix-price">¥6199</div>
         
        </div>
      </div>
    </div>
    
    <!-- 查看全部 -->
    <div class="view-all">
      <a href="#" class="view-link">查看全部华为手机 ></a>
    </div>
  </div>
</section>

    <!-- 平板产品模块 -->
<section class="product-section tablet-section">
  <div class="container">
    <h2 class="section-title">
      <span class="title-icon">📱</span>
      华为平板
    </h2>
    
    <!-- 旗舰产品展示 -->
    <div class="flagship-product">
      <div class="flagship-image">
        <img src="./images/matepad pro 13.2.png" 
             alt="HUAWEI MatePad Pro 13.2英寸" class="product-img">
        <div class="flagship-badge">旗舰新品</div>
      </div>
      <div class="flagship-info">
        <h3 class="product-title">HUAWEI MatePad Pro 13.2英寸</h3>
        <p class="product-desc">柔性OLED柔光屏｜PC级WPS Office｜星闪手写笔</p>
        <div class="price-section">
          <span class="current-price">¥5499</span>
          <span class="original-price">¥5999</span>
        </div>
        <div class="tag-group">
          <span class="product-tag">限时优惠</span>
          <span class="product-tag">12期免息</span>
        </div>
        <button class="buy-btn">立即购买</button>
      </div>
    </div>

    <!-- 产品矩阵 -->
    <div class="product-matrix">
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/matepad pro12.2.png" 
               alt="MatePad Pro 12.6英寸" class="matrix-img">
          <h4 class="matrix-title">MatePad Pro 12.6"</h4>
          <p class="matrix-desc">120Hz OLED｜HarmonyOS 4</p>
          <div class="matrix-price">¥4699</div>
          
        </div>
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/matepad air.png" 
               alt="MatePad Air" class="matrix-img">
          <h4 class="matrix-title">MatePad Air</h4>
          <p class="matrix-desc">11.5" 144Hz｜3:2生产力屏</p>
          <div class="matrix-price">¥3299</div>
          
        </div>   
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/matepad 11.png" 
               alt="MatePad 11.5" class="matrix-img">
          <h4 class="matrix-title">MatePad 11.5"</h4>
          <p class="matrix-desc">120Hz护眼屏｜教育中心</p>
          <div class="matrix-price">¥2499</div>
          
        </div>
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/matepad SE.png" 
               alt="MatePad SE" class="matrix-img">
          <h4 class="matrix-title">MatePad SE</h4>
          <p class="matrix-desc">10.4"｜儿童模式</p>
          <div class="matrix-price">¥1499</div>
         
        </div>
      </div>
    </div>
    
    <!-- 查看全部 -->
    <div class="view-all">
      <a href="#" class="view-link">查看全部华为平板 ></a>
    </div>
  </div>
</section>



    <!-- 穿戴产品模块 -->
<section class="product-section tablet-section">
  <div class="container">
    <h2 class="section-title">穿戴</h2>
    
    <!-- 旗舰产品展示 -->
    <div class="flagship-product">
      <div class="flagship-image">
        <img src="./images/watch 5.png" 
             alt="HUAWEI MatePad Pro 13.2英寸" class="product-img">
        <div class="flagship-badge">旗舰新品</div>
      </div>
      <div class="flagship-info">
        <h3 class="product-title">HUAWEI MatePad Pro 13.2英寸</h3>
        <p class="product-desc">柔性OLED柔光屏｜PC级WPS Office｜星闪手写笔</p>
        <div class="price-section">
          <span class="current-price">¥5499</span>
          <span class="original-price">¥5999</span>
        </div>
        <div class="tag-group">
          <span class="product-tag">限时优惠</span>
          <span class="product-tag">12期免息</span>
        </div>
        <button class="buy-btn">立即购买</button>
      </div>
    </div>

    <!-- 产品矩阵 -->
    <div class="product-matrix">
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/watch4 pro.png" 
               alt="MatePad Pro 12.6英寸" class="matrix-img">
          <h4 class="matrix-title">MatePad Pro 12.6"</h4>
          <p class="matrix-desc">120Hz OLED｜HarmonyOS 4</p>
          <div class="matrix-price">¥4699</div>
          
        </div>
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/watch FIT4.png" 
               alt="MatePad Air" class="matrix-img">
          <h4 class="matrix-title">MatePad Air</h4>
          <p class="matrix-desc">11.5" 144Hz｜3:2生产力屏</p>
          <div class="matrix-price">¥3299</div>
          
        </div>   
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/watch FIT 4 Pro.png" 
               alt="MatePad 11.5" class="matrix-img">
          <h4 class="matrix-title">MatePad 11.5"</h4>
          <p class="matrix-desc">120Hz护眼屏｜教育中心</p>
          <div class="matrix-price">¥2499</div>
          
        </div>
      </div>
      
      <div class="product-column">
        <div class="matrix-product">
          <img src="./images/watch GT5.png" 
               alt="MatePad SE" class="matrix-img">
          <h4 class="matrix-title">MatePad SE</h4>
          <p class="matrix-desc">10.4"｜儿童模式</p>
          <div class="matrix-price">¥1499</div>
         
        </div>
      </div> 
    </div>
    
    <!-- 查看全部 -->
    <div class="view-all">
      <a href="#" class="view-link">查看全部华为穿戴 ></a>
    </div>
  </div>
</section>


<!-- 商品分类2 -->
    <section class="product-categories">
        <div class="container">
            <div class="category">
                <h3>热门产品</h3>
                <div class="products">
                    <div class="product-card">
                        <img src="./images/pura 70.png" alt="华为P70">
                        <h4>华为P70</h4>
                        <p class="price">¥5599起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/pura70 pro.png" alt="华为P70 Pro">
                        <h4>华为P70 Pro</h4>
                        <p class="price">¥6199起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/mate x6.png" alt="华为Mate X6">
                        <h4>华为Mate X6</h4>
                        <p class="price">¥12999起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/nova12活力版.png" alt="Nova 12">
                        <h4>华为Nova12 活力版</h4>
                        <p class="price">¥2699起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                </div>
            </div>
            
            <div class="category">
                <h3>新品上市</h3>
                <div class="products">
                    <div class="product-card">
                        <img src="./images/matepad pro.png" alt="华为MatePad Pro">
                        <h4>华为MatePad Pro</h4>
                        <p class="price">¥4999起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/FreeBuds pro 4.png" alt="华为FreeBuds Pro 4">
                        <h4>华为FreeBuds Pro 4</h4>
                        <p class="price">¥1349</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/Vision 智慧屏5.png" alt="华为智慧屏 5">
                        <h4>华为智慧屏 5</h4>
                        <p class="price">¥6099起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/路由X1 pro.png" alt="华为路由X1 Pro">
                        <h4>华为路由X1 Pro</h4>
                        <p class="price">¥899起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                </div>
            </div>

            <div class="category">
                <h3>热门产品</h3>
                <div class="products">
                    <div class="product-card">
                        <img src="./images/watch FIT 4 Pro.png" alt="watchFIT 4 pro">
                        <h4>Watch FIT4 Pro</h4>
                        <p class="price">¥5599起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/watch FIT4.png" alt="watch FIT4">
                        <h4>Watch FIT4</h4>
                        <p class="price">¥6199起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/watch GT5.png" alt="watch GT5">
                        <h4>Watch GT5</h4>
                        <p class="price">¥12999起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                    <div class="product-card">
                        <img src="./images/watch 5.png" alt="华为WATCH 5">
                        <h4>华为WATCH 5</h4>
                        <p class="price">¥2699起</p>
                        <button class="add-to-cart">加入购物车</button>
                    </div>
                </div>
            </div>

            </div>
        </div>
    </section>

    <!-- 促销活动 -->
    <section class="promotion">
        <div class="container">
            <h2>限时优惠</h2>
            <div class="promo-cards">
                <div class="promo-card">
                    <img src="./images/手机.png" alt="限时优惠">
                    <div class="promo-content">
                        <h3>华为P60系列</h3>
                        <p>限时直降500元</p>
                        <p class="time-left">剩余时间: 2天 12:30:15</p>
                        <a href="#" class="btn">立即抢购</a>
                    </div>
                </div>
                <div class="promo-card">
                    <img src="./images/watch4 pro.png" alt="限时优惠">
                    <div class="promo-content">
                        <h3>华为WATCH 4系列</h3>
                        <p>赠价值299元表带</p>
                        <p class="time-left">剩余时间: 1天 08:15:22</p>
                        <a href="#" class="btn">立即抢购</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="main-footer">
        <div class="container">
            <div class="footer-links">
                <div class="link-group">
                    <h4>购物相关</h4>
                    <ul>
                        <li><a href="#">购物指南</a></li>
                        <li><a href="#">配送方式</a></li>
                        <li><a href="#">支付方式</a></li>
                        <li><a href="#">常见问题</a></li>
                    </ul>
                </div>
                <div class="link-group">
                    <h4>售后服务</h4>
                    <ul>
                        <li><a href="#">退换货政策</a></li>
                        <li><a href="#">维修服务</a></li>
                        <li><a href="#">保修政策</a></li>
                        <li><a href="#">售后网点</a></li>
                    </ul>
                </div>
                <div class="link-group">
                    <h4>关于我们</h4>
                    <ul>
                        <li><a href="#">公司简介</a></li>
                        <li><a href="#">招贤纳士</a></li>
                        <li><a href="#">联系我们</a></li>
                        <li><a href="#">隐私政策</a></li>
                    </ul>
                </div>
                <div class="link-group">
                    <h4>关注我们</h4>
                    <ul class="social-links">
                        <li><a href="#"><i class="fa fa-weibo"></i> 微博</a></li>
                        <li><a href="#"><i class="fa fa-weixin"></i> 微信</a></li>
                        <li><a href="#"><i class="fa fa-qq"></i> QQ</a></li>
                    </ul>
                </div>
            </div>
            <div class="copyright">
                <p>© 2024 华为技术有限公司 版权所有 粤ICP备14048200号</p>
                <p>消费者服务热线：950800 邮箱：vmall@huawei.com</p>
            </div>
        </div>
    </footer>

    <!-- 登录模态框 -->
    <div class="modal" id="login-modal">
        <div class="modal-content">
            <span class="close">&times;</span>
            <h2>登录华为账号</h2>
            <form id="login-form">
                <div class="form-group">
                    <input type="text" placeholder="手机号/邮箱/华为账号" required>
                </div>
                <div class="form-group">
                    <input type="password" placeholder="密码" required>
                </div>
                <div class="form-group remember">
                    <input type="checkbox" id="remember">
                    <label for="remember">记住账号</label>
                    <a href="#" class="forgot-password">忘记密码?</a>
                </div>
                <button type="submit" class="btn">登录</button>
                <div class="register-link">
                    还没有华为账号? <a href="#">立即注册</a>
                </div>
            </form>
        </div>
    </div>
       <!-- 注册模态框 -->
<div class="modal" id="register-modal">
    <div class="modal-content">
        <span class="close">&times;</span>
        <h2>注册华为账号</h2>
        <form id="register-form">
            <div class="form-group">
                <input type="text" placeholder="手机号/邮箱" required>
            </div>
            <div class="form-group">
                <input type="password" placeholder="设置密码" required>
            </div>
            <div class="form-group">
                <input type="password" placeholder="确认密码" required>
            </div>
            <div class="form-group">
                <input type="text" placeholder="验证码" required>
                <button type="button" class="btn-send-code">获取验证码</button>
            </div>
            <div class="form-group agreement">
                <input type="checkbox" id="agree" required>
                <label for="agree">我已阅读并同意<a href="#">《华为账号用户协议》</a>和<a href="#">《隐私政策》</a></label>
            </div>
            <button type="submit" class="btn">注册</button>
            <div class="login-link">
                已有华为账号? <a href="#" id="to-login">立即登录</a>
            </div>
        </form>
    </div>
</div>

<!-- 右下角固定工具栏 -->
<div class="toolbar">
  <div class="toolbar-item" id="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span class="tooltip">回到顶部</span>
  </div>
  <div class="toolbar-item" id="customer-service">
    <i class="fa fa-headphones"></i>
    <span class="tooltip">联系客服</span>
  </div>
</div>

<!-- 客服浮窗 (初始隐藏) -->
<div class="service-popup" id="service-popup">
  <div class="popup-header">
    <h4>华为客服</h4>
    <span class="close-popup">&times;</span>
  </div>
  <div class="popup-content">
    <div class="service-option">
      <i class="fa fa-phone"></i>
      <span>950800</span>
    </div>
    <div class="service-option">
      <i class="fa fa-comments"></i>
      <span>在线咨询</span>
    </div>
    <div class="service-option">
      <i class="fa fa-question-circle"></i>
      <span>帮助中心</span>
    </div>
  </div>
</div>

    <script src="./js/script.js"></script>
</body>
</html>